// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import FastClick from 'fastclick'
import VueRouter from 'vue-router'
import App from './App'
import VueResource from 'vue-resource'

export const Base64 = require('js-base64').Base64
Vue.use(VueRouter)
Vue.use(VueResource)
Vue.use(Base64)
const Hello = resolve => require(['./components/Hello'], resolve)
const TextV = resolve => require(['./components/text/textName'], resolve)
const productDetails = resolve => require(['./components/text/productDetails'], resolve)

const routes = [{
  path: '/index',
  component: Hello
}, {
  path: '/text/:contentTip',
  component: TextV
}, {
  path: '/productDetails',
  component: productDetails
}]

const router = new VueRouter({
  routes
})
FastClick.attach(document.body)

Vue.config.productionTip = false

new Vue({
  mode: 'history',
  router,
  render: h => h(App)
}).$mount('#app-box')
